package spring_ioc.hello1;

import spring_ioc.hello1.service.Action;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Test1_InMain {
    public static void main(String[] args) {
        String XML = "src/main/java/spring_ioc/hello1/applicationContext.xml";
        ApplicationContext ctx = new
                FileSystemXmlApplicationContext(XML);

        Action action1 = (Action) ctx.getBean("TheAction1");
        Action action2 = (Action) ctx.getBean("TheAction2");

        action1.execute("Rod Johnson4");
        action2.execute("Rod Johnson4");
    }
}
